
window.addEvent('domready', function()
{
	// copies 'error' class from SPAN to parent element (usually P).
	$$('form span.error').each(function(span)
	{
		var parent = span.getParent();
		if (parent.get('tag') == 'span') {
			parent = parent.getParent();
		}
		parent.addClass('error');
	});
});
